Optimal. Leaf size=138 \[ \frac {8 a^2 (21 A+19 B) \sin (c+d x)}{105 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a (21 A+19 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A-2 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+a \cos (c+d x))^{5/2} \sin (c+d x)}{7 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3047, 3102,
2830, 2726, 2725} \begin {gather*} \frac {8 a^2 (21 A+19 B) \sin (c+d x)}{105 d \sqrt {a \cos (c+d x)+a}}+\frac {2 (7 A-2 B) \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{35 d}+\frac {2 a (21 A+19 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{105 d}+\frac {2 B \sin (c+d x) (a \cos (c+d x)+a)^{5/2}}{7 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2725
Rule 2726
Rule 2830
Rule 3047
Rule 3102
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \cos (c+d x))^{3/2} (A+B \cos (c+d x)) \, dx &=\int (a+a \cos (c+d x))^{3/2} \left (A \cos (c+d x)+B \cos ^2(c+d x)\right ) \, dx\\ &=\frac {2 B (a+a \cos (c+d x))^{5/2} \sin (c+d x)}{7 a d}+\frac {2 \int (a+a \cos (c+d x))^{3/2} \left (\frac {5 a B}{2}+\frac {1}{2} a (7 A-2 B) \cos (c+d x)\right ) \, dx}{7 a}\\ &=\frac {2 (7 A-2 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+a \cos (c+d x))^{5/2} \sin (c+d x)}{7 a d}+\frac {1}{35} (21 A+19 B) \int (a+a \cos (c+d x))^{3/2} \, dx\\ &=\frac {2 a (21 A+19 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A-2 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+a \cos (c+d x))^{5/2} \sin (c+d x)}{7 a d}+\frac {1}{105} (4 a (21 A+19 B)) \int \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {8 a^2 (21 A+19 B) \sin (c+d x)}{105 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a (21 A+19 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A-2 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+a \cos (c+d x))^{5/2} \sin (c+d x)}{7 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.41, size = 81, normalized size = 0.59 \begin {gather*} \frac {a \sqrt {a (1+\cos (c+d x))} (546 A+494 B+(252 A+253 B) \cos (c+d x)+6 (7 A+13 B) \cos (2 (c+d x))+15 B \cos (3 (c+d x))) \tan \left (\frac {1}{2} (c+d x)\right )}{210 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 104, normalized size = 0.75
method | result | size |
default | \(\frac {4 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (-60 B \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (42 A +168 B \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-105 A -175 B \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+105 A +105 B \right ) \sqrt {2}}{105 \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(104\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.55, size = 123, normalized size = 0.89 \begin {gather*} \frac {42 \, {\left (\sqrt {2} a \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 5 \, \sqrt {2} a \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 20 \, \sqrt {2} a \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} A \sqrt {a} + {\left (15 \, \sqrt {2} a \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 63 \, \sqrt {2} a \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 175 \, \sqrt {2} a \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 735 \, \sqrt {2} a \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} B \sqrt {a}}{420 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 88, normalized size = 0.64 \begin {gather*} \frac {2 \, {\left (15 \, B a \cos \left (d x + c\right )^{3} + 3 \, {\left (7 \, A + 13 \, B\right )} a \cos \left (d x + c\right )^{2} + {\left (63 \, A + 52 \, B\right )} a \cos \left (d x + c\right ) + 2 \, {\left (63 \, A + 52 \, B\right )} a\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{105 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.63, size = 155, normalized size = 1.12 \begin {gather*} \frac {\sqrt {2} {\left (15 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 21 \, {\left (2 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 3 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 35 \, {\left (6 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 5 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 105 \, {\left (8 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 7 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a}}{420 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \cos \left (c+d\,x\right )\,\left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________